<!DOCTYPE HTML>
<html>
<head>
<title>个人信息</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="__PUBLIC__/Admin/layui/css/layui.css" type='text/css' />
<link href="__PUBLIC__/Admin/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="__PUBLIC__/Admin/css/style.css" rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="__PUBLIC__/Admin/css/morris.css" type="text/css"/>
<!-- Graph CSS -->
<link href="__PUBLIC__/Admin/css/font-awesome.css" rel="stylesheet"> 
<!-- jQuery -->
<script src="__PUBLIC__/Admin/js/jquery-2.1.4.min.js"></script>
<!-- //jQuery -->
<!-- lined-icons -->
<link rel="stylesheet" href="__PUBLIC__/Admin/css/icon-font.min.css" type='text/css' />
<!-- //lined-icons -->

    <script src="__PUBLIC__/Admin/layer/layer.js"></script>
    <script src="__PUBLIC__/Admin/layui/layui.js"></script>

</head> 
<body>
   <div class="page-container">
   <!--/content-inner-->
<div class="left-content">
	   <div class="mother-grid-inner">
             <!--header start here-->
				
				<include file="Public/header" />
				
<!--heder end here-->
	<ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{:U('Index/index')}">首页</a><i class="fa fa-angle-right"></i>个人信息</li>
            </ol>
<div class="inbox-mail">

<!-- tab content -->
<div class="col-md-8 tab-content tab-content-in w3">

<div class="tab-pane text-style active" id="tab1" style="background:white;">

    <blockquote class="layui-elem-quote layui-text">
        个人信息主页
    </blockquote>

    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">

    </fieldset>

    <form class="layui-form" action="{:U('Userinfo/userinfo')}" method="post" >
    <foreach name="infolist" item="info">
        <?php if($info['uid']==I('cookie.uid')){ ?>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-inline">
                    <input type="text" name="account" lay-verify="required" class="layui-input" value="{$info.account}" disabled="">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">用户名</label>
                <div class="layui-input-inline">
                    <input type="tel" name="name" lay-verify="required" autocomplete="off" class="layui-input" value="{$info.name}">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    <if condition="$info.sex eq '男'">
                        <input type="radio" name="sex" value="男" title="男" checked="">
                        <input type="radio" name="sex" value="女" title="女">
                        <elseif condition="$info.sex eq '女'"/>
                        <input type="radio" name="sex" value="男" title="男">
                        <input type="radio" name="sex" value="女" title="女" checked="">
                        <else/>
                        <input type="radio" name="sex" value="男" title="男">
                        <input type="radio" name="sex" value="女" title="女">
                    </if>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">生日</label>
                <div class="layui-input-inline">
                    <input type="text" name="birthday" id="date" lay-verify="date" value="{$info['birthday']}" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">部门</label>
                <div class="layui-input-inline">
                    <input type="text" name="department" lay-verify="required" autocomplete="off" class="layui-input" value="{$info.department}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">家乡</label>
                <div class="layui-input-inline">
                    <input type="text" name="hometown" lay-verify="" autocomplete="off" class="layui-input" value="{$info.hometown}">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">学院</label>
                <div class="layui-input-inline">
                    <input type="text" name="college" lay-verify="required" autocomplete="off" class="layui-input" value="{$info.college}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">班级</label>
                <div class="layui-input-inline">
                    <input type="text" name="class" lay-verify="required" autocomplete="off" class="layui-input" value="{$info.class}">
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">QQ号</label>
                <div class="layui-input-inline">
                    <input type="text" name="qq" lay-verify="required|number" autocomplete="off" class="layui-input" value="{$info.qq}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="padding-left:0;">手机号码</label>
                <div class="layui-input-inline">
                    <input type="tel" name="phone" lay-verify="required|number" autocomplete="off" class="layui-input" value="{$info.phone}">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label" style="padding-left:0;">电子邮箱</label>
                <div class="layui-input-inline">
                    <input type="email" name="email" lay-verify="email" autocomplete="off" class="layui-input" value="{$info.email}">
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label" style="padding-left:1px;">自我简介</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入您的自我简介" name="per_intro" class="layui-textarea">{$info['per_intro']}</textarea>
            </div>
        </div>

        <div class="layui-form-item" style="padding-bottom:20px;">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
        <?php } ?>
    </foreach>
    </form>


</div>

</div>
<div class="clearfix"> </div>
   </div>
<!-- script-for sticky-nav -->
		<script>
		$(document).ready(function() {
			 var navoffeset=$(".header-main").offset().top;
			 $(window).scroll(function(){
				var scrollpos=$(window).scrollTop(); 
				if(scrollpos >=navoffeset){
					$(".header-main").addClass("fixed");
				}else{
					$(".header-main").removeClass("fixed");
				}
			 });
			 
		});

        </script>
		<!-- /script-for sticky-nav -->
<!--inner block start here-->
<div class="inner-block">

</div>
<!--inner block end here-->
<!--copy rights start here-->
<!--COPY rights end here-->
</div>
</div>
  <!--//content-inner-->
		<!--/sidebar-menu-->
				
								<include file="Public/category" />

							  <div class="clearfix"></div>		
							</div>
							<script>
							var toggle = true;
										
							$(".sidebar-icon").click(function() {                
							  if (toggle)
							  {
								$(".page-container").addClass("sidebar-collapsed").removeClass("sidebar-collapsed-back");
								$("#menu span").css({"position":"absolute"});
							  }
							  else
							  {
								$(".page-container").removeClass("sidebar-collapsed").addClass("sidebar-collapsed-back");
								setTimeout(function() {
								  $("#menu span").css({"position":"relative"});
								}, 400);
							  }
											
											toggle = !toggle;
										});
							</script>
<!--js -->
<script src="__PUBLIC__/Admin/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/Admin/js/scripts.js"></script>
<!-- Bootstrap Core JavaScript -->
   <script src="__PUBLIC__/Admin/js/bootstrap.min.js"></script>
   <!-- /Bootstrap Core JavaScript -->
   <script>
       layui.use(['form', 'layedit', 'laydate'], function(){
           var form = layui.form
               ,layer = layui.layer
               ,layedit = layui.layedit
               ,laydate = layui.laydate;

           //日期
           laydate.render({
               elem: '#date'
           });
           laydate.render({
               elem: '#date1'
           });

           //创建一个编辑器
           var editIndex = layedit.build('LAY_demo_editor');

           //自定义验证规则
           form.verify({
               title: function(value){
                   if(value.length < 5){
                       return '标题至少得5个字符啊';
                   }
               }
               ,pass: [/(.+){6,12}$/, '密码必须6到12位']
               ,content: function(value){
                   layedit.sync(editIndex);
               }
           });






       });
   </script>
</body>
</html>